package test.com.linkgie.galaxyframework.binaryserialize;

import com.linkgie.galaxyframework.binaryserialize.BinaryType;
import com.linkgie.galaxyframework.binaryserialize.BinaryField;
import com.linkgie.galaxyframework.binaryserialize.NumberEncoding;
import com.linkgie.galaxyframework.binaryserialize.PrimitiveType;

import utils.Bytes;
import utils.net.NetworkAddress;

/**
 * 
 */
@BinaryType(code = 0x05, name = "Primitive", description = "")
public interface PrimitiveDatas {

	@BinaryField(index = 2, primitiveType = PrimitiveType.BOOLEAN)
	boolean isEnable();

	@BinaryField(index = 3, primitiveType = PrimitiveType.INT8)
	byte isBoy();

	@BinaryField(index = 4, primitiveType = PrimitiveType.INT16)
	short getAge();

	@BinaryField(index = 5, primitiveType = PrimitiveType.INT32, numberEncoding = NumberEncoding.NORMAL)
	int getNumber();

	@BinaryField(index = -1, primitiveType = PrimitiveType.INT32)
	int getId();

	@BinaryField(index = 6, primitiveType = PrimitiveType.TEXT)
	String getName();

	@BinaryField(index = 7, primitiveType = PrimitiveType.INT64)
	long getValue();

	@BinaryField(index = 8, primitiveType = PrimitiveType.INT64, numberEncoding = NumberEncoding.LONG, iterable = true)
	long[] getSizes();

	@BinaryField(index = 12, primitiveType = PrimitiveType.BYTES)
	byte[] getImage();

	@BinaryField(index = 100, primitiveType = PrimitiveType.INT16)
	char getFlag();

	@BinaryField(index = 200, primitiveType = PrimitiveType.BYTES)
	Bytes getConfig();

	@BinaryField(index = 201, primitiveType = PrimitiveType.BYTES)
	Bytes getSetting();

	@BinaryField(index = 202, primitiveType = PrimitiveType.BYTES)
	NetworkAddress getNetworkAddr();

}
